class Giga < Download
	def start
		link = URI.parse(@link)
		http = Net::HTTP.new(link.host, link.port)
		http.get(link.request_uri,@headers)
		a = http.get("/form.php",@headers).body.scan(/>(http.*)<\/a>/)[0]
		link2 = URI.parse(a.to_s)
		link3 =URI.parse(http.get(link2.request_uri,@headers).header['location'])
		http2 = Net::HTTP.new(link3.host, link3.port)
		@name = http2.head(link3.request_uri,@headers).header['content-disposition'].scan(/filename=\"(.*)\"$/)[0]
		File.open(File.join(@tempdir,@name),"wb"){ |file|
 			http2.get(link3.request_uri,@headers) do |str|
				file.write str
			end
		}
	end
end
